package cn.com.xf.service;

import java.util.List;

import cn.com.xf.domain.TcaKnowledgefile;
import cn.com.xf.domain.TcaKnowledgefolder;

public interface WikiService {
	/**
	 * 获取某一节点的子类及其直属文章
	 * 
	 * @return
	 */
	public List<TcaKnowledgefolder> selectFloderAndTitle(String floderId);

	/**
	 * 读取文章
	 * 
	 * @param itemId
	 * @return
	 */
	public TcaKnowledgefile selectItemById(String itemId);

	/**
	 * 获取全目录
	 * 
	 * @return
	 */
	public List<TcaKnowledgefolder> selectAllFolder();

	/**
	 * 修改目录名
	 * 
	 * @param folderTitle
	 * @param folderId
	 * @return
	 */
	public int updateFolderTitle(String folderTitle, String folderId);

	/**
	 * 获取目录
	 * 
	 * @param folderId
	 * @return
	 */
	public TcaKnowledgefolder selectFolderById(String folderId);

	/**
	 * 增加目录
	 * 
	 * @param pFolderId
	 * @param levelid
	 * @param title
	 * @return
	 */
	public int updateAddFolder(TcaKnowledgefolder folder);

	/**
	 * 添加条目
	 * 
	 * @param title
	 * @param folderId
	 * @param content
	 * @return
	 */
	public int insertItem(String title, String folderId, String content);

	public List<TcaKnowledgefile> selectItems();

	/**
	 * 为选项做显示
	 * 
	 * @return
	 */
	public List<TcaKnowledgefolder> selectAllFolder4Option();

	public int selectItemsCount(String title, String folderId, String valid);

	public List<TcaKnowledgefile> selectItems(int begin, int pageSize, String orderByField, String orderByMode,
			String title, String folderId, String valid);

	/**
	 * 删除条目
	 * 
	 * @param folderId
	 * @return
	 */
	public int deleteItem(String itemId);

	/**
	 * 修改条目
	 * 
	 * @param title
	 * @param folderId
	 * @param itemId
	 * @param conent
	 * @return
	 */
	public int updateItem(String title, String folderId, String itemId, String conent);

	/**
	 * 修改条目的审核状态
	 * 
	 * @param itemId
	 * @param auditStatus
	 * @return
	 */
	public int updateAudit(String itemId, String auditStatus);
}
